package cn.afactory.tygz.ui.base.views.subject;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

public abstract class BaseSubjectView<T, VH extends BaseSubjectView.ViewHolder> extends LinearLayout{

    public BaseSubjectView(Context context) {
        super(context);
    }

    public abstract View newView( LayoutInflater inflater, ViewGroup parent);

    public abstract VH createViewHolder(View view);

    public abstract View bindView(LayoutInflater mInflater, ViewGroup parent, final T item, View convertView);

    public static abstract class ViewHolder {
        View rootView;

        public ViewHolder() {
        }

        public ViewHolder(View view) {
            rootView = view;
        }
    }
}
